package com.junzhiit.nengji.model.enums;

import com.bainaeco.framework.exception.InvalidArgumentException;

public enum SystemUserType {
	
	SHOP(0,"商户"),
	OPERATION(1,"城市运营"),
	INTERNAL(2,"总部");
	
	private Integer value;
	
	private String text;

	private SystemUserType(Integer value,String text){
		this.value = value;
		this.text = text;
	}

	public int toIntStatus() {
		return this.value;
	}
	
	public String toStringValue() {
		return this.text;
	}

	public static SystemUserType toValue(int value) {
		if (SHOP.value == value) {
			return SHOP;
		} else if (OPERATION.value == value) {
			return OPERATION;
		}else if(INTERNAL.value == value){
			return INTERNAL;
		}else {
			throw new InvalidArgumentException("Unknown SystemUserType[" + value + "].");
		}
	}
}
